vcBooleanSignalMap
vcBoolSignalMap allows you to map Boolean signals to ports in a continuous IO space.
See in: Overview
Module: vcBehaviors
Parent: vcSignalMap
Children -
Referenced by: vcRobotExecutor.DigitalInputSignals, vcRobotExecutor.DigitalOutputSignals
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| AvailablePorts | Integer | RW | Defines the number of available ports in the signal map. |
| EndIndex | Integer | RW | Defines the end index of ports in the signal map. Its value is updated automatically when setting Ports or PortCount. |
| StartIndex | Integer | RW | Defines the start index of ports in the signal map. It can be used in conjunction with EndIndex to define the amount of ports in the signal map. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| connect | None | Integer indexPort1, vcBooleanSignalMap signalMap2, Integer indexPort2 | Creates a remote connection with another signal map or signal. If a port is connected to a signal, refer to the abstract interface of the connection to disconnect only that signal. See moreOtherwise, the disconnect() method will disconnect all signals connected to the port. Signals in components can act as abstract interfaces between ports, sending and receiving information via signal maps. See vcBooleanSignal for more information. Parameters: indexPort1 (int): Index of the first port. signalMap2 (vcBooleanSignalMap): Other signal map. indexPort2 (int): Other signal map port. Exceptions: RuntimeError: When value of the index is incorrect. |
| connect | None | Integer index, vcBooleanSignal signal | Creates a remote connection with another signal map or signal. If a port is connected to a signal, refer to the abstract interface of the connection to disconnect only that signal. See moreOtherwise, the disconnect() method will disconnect all signals connected to the port. Signals in components can act as abstract interfaces between ports, sending and receiving information via signal maps. See vcBooleanSignal for more information. Parameters: index (int): Index of the port. signal (vcBooleanSignal): Signal to connect. Exceptions: RuntimeError: When value of the index or signal is incorrect. |
| disconnect | None | Integer index | Disconnects a port at a given index from its connections.See moreParameters: index (int): Port index to disconnect. Exceptions: RuntimeError: When value of the index is incorrect. |
| getAllConnectedPorts | list[Integer] | None | Gets a list of all connected ports in the signal map. Returns: List[int]: List of the connected ports. |
| getConnectedExternalPorts | list | Integer index | Gets a list of all ports in other components connected to a local port at a given index in the signal map.See moreParameters: index (int): Index of the port. Returns: List[Tuple[vcBooleanSignalMap, int]]: List of pairs of boolean signal map and port, empty list if nothing was found. Exceptions: RuntimeError: When value of the index is incorrect. |
| getConnectedExternalSignals | vcList | Integer index | Gets a list of all signals in other components connected to a local port at the given index in the signal map.See moreParameters: index (int): Index of the port. Returns: List[vcBooleanSignal]: List of signals or empty list if nothing was found at the given index. Exceptions: RuntimeError: When value of the index is incorrect. |
| getInternalPortSignal | vcBooleanSignal | Integer index | Returns the signal connected to a port at given index; otherwise returns None.See moreParameters: index (int):Index of the port. Returns: vcBooleanSignal: Signal connected to the given port index. Exceptions: RuntimeError: When value of the index is incorrect. |
| getSignalValue | Boolean | Integer index | Gets the value of a port at a given index.See moreParameters: index (int): Index of the port. Returns: bool: Value of a port at a given index. Exceptions: RuntimeError: When value of the index is incorrect. |
| setPortSignal | None | Integer index, vcBooleanSignal signal | Sets the signal of a port at a given index. An optional signal argument can be given to assign the port a signal in its component. Otherwise, the port is assigned a dynamic, application signal. See moreParameters: index (int): Index of the port. signal (vcBooleanSignal): Signal to set. Exceptions: RuntimeError: When value of the index is incorrect. |
| setSignalValue | None | Integer index, Boolean value | Sets the value of a port at a given index to a given value.See moreParameters: index (int): Index of a port. value (bool): Value of the signal to set at the given port index. Exceptions: RuntimeError: When value of the index is incorrect. |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnSignalTrigger | vcBooleanSignalMap signalMap, int port, bool value | Triggered when the value of a signal mapped to a port has a new value.See moreParameters: signalMap (vcBooleanSignalMap): Signal map that triggered the event. port (int): Target port. value (bool): New value. |